<?php
    if(isset($_POST["json"])) {
        $p = $_POST["json"];
                 
    	if(file_put_contents('map_data.json', $p))//json_encode($p)))
        {
            echo "Succ";
        } else {
            echo "Fail";
        }
    } else if(isset($_POST["score"])) {
        $p = $_POST["score"];
        if(file_put_contents('scores.json', $p))//json_encode($p)))
        {
            echo "Succ";
        } else {
            echo "Fail";
        }
    }
?>
